package com.tianji.learning.task;

import com.tianji.learning.service.IPointsBoardService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class ClearPointsBoardFromRedisTask {

    @Autowired
    private IPointsBoardService boardService;

    @XxlJob("clearPointsBoardFromRedis")
    public ReturnT<String> clearPointsBoardFromRedis(){
        log.info("clearPointsBoardFromRedis start");
        boardService.clearPointsBoardFromRedis();
        log.info("clearPointsBoardFromRedis end");
        return ReturnT.SUCCESS;
    }

}
